//
//  LateCell.m
//  jiyujiaProgram
//
//  Created by Jame on 15/11/10.
//  Copyright © 2015年 中良 赵. All rights reserved.
//

#import "LateCell.h"
#import "RankModel.h"

@implementation LateCell

- (void)awakeFromNib {
    // Initialization code
}


- (void)setCellWithModel:(NSArray *)model WithIndexPath:(NSIndexPath *)index
{
    RankData *data = model[index.section];
    
    [self.headImage sd_setImageWithURL:[NSURL URLWithString:data.imgUrl] placeholderImage:ECIMAGENAME(@"header.png")];
    self.headImage.clipsToBounds = YES;
    self.headImage.layer.cornerRadius = 25;
    
    
    
    
    if ([data.name isEqualToString:@"<null>"] || data.name.length < 1 || [data.signature isKindOfClass:nil]) {
        self.nameLabel.text = @"暂无数据";
    }else{
        self.nameLabel.text = data.name;
    }
    
    if ([data.specialty isEqualToString:@"<null>"] || data.specialty.length < 1 || [data.signature isKindOfClass:nil]) {
        self.typeLabel.text = @"级别：暂无数据";
    }else{
        self.typeLabel.text = [NSString stringWithFormat:@"级别：%@",data.specialty];
    }
    
    if ([data.seniority isEqualToString:@"<null>"] || data.seniority.length < 1 || [data.signature isKindOfClass:nil]){
        self.teachTimeLabel.text = @"教龄：暂无数据";
    }else{
        self.teachTimeLabel.text = [NSString stringWithFormat:@"教龄：%@年",data.seniority];
    }
    
    if ([data.area isEqualToString:@"<null>"] || data.area.length < 1 || [data.signature isKindOfClass:nil]) {
        self.areaLabel.text = @"地区：暂无数据";
    }else{
        self.areaLabel.text = [NSString stringWithFormat:@"地区：%@",data.area];
    }
    
    if ([data.signature isEqualToString:@"<null>"] || data.signature.length < 1 || [data.signature isKindOfClass:nil]) {
        self.signLabel.text = @"签名：暂无数据";
    }else{
        self.signLabel.text = [NSString stringWithFormat:@"签名：%@",data.signature];
    }

//    self.typeLabel.text = [NSString stringWithFormat:@"级别：%@",data.specialty];
//    self.teachTimeLabel.text = [NSString stringWithFormat:@"教龄：%@年",data.seniority];
//    self.areaLabel.text = [NSString stringWithFormat:@"地区：%@",data.area];
//    self.signLabel.text = [NSString stringWithFormat:@"签名：%@",data.signature];
    self.lateLabel.text = @"延误次数：0次";
    self.statusLabel.text = [NSString stringWithFormat:@"%@项认证 %@项评论",data.certificationCount,data.commentsCount];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
